Skip to content

feat(cli): write gh skill metadata to skills copied by ig ai-config - #1913

Merged
kdinev merged 6 commits into
dkalinov/gh-skill-hide-bundled-copiesfrom
dkalinov/gh-skill-metadata
Dec 3, 2026
Merged

kdinev merged 6 commits into
dkalinov/gh-skill-hide-bundled-copiesfrom
dkalinov/gh-skill-metadata

Conversation

@dkalinovInfra

@dkalinovInfra dkalinovInfra commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Description

Part 2 of 3 of gh skill compatibility for ig ai-config. Stacked on the PR that stores the bundled skills as SKILL.md.template; the base branch is that PR's branch, so this diff shows only this part.

Skills written by ig ai-config are now tracked by gh skill (GitHub CLI 2.90+): each written SKILL.md gets the github-* metadata that gh skill list and gh skill update read.

  • Skills from an installed Ignite UI package (Angular, React, Web Components) get refs/tags/<installed version> and a pin to that version. They are always overwritten, because the package is the version the project uses. Move them by updating the package and running ig ai-config again, or with gh skill update --unpin. When ig ai-config writes them over a folder that gh skill had updated, it lists that folder ("Replaced N skill(s) that gh skill had updated…"), also in a non-verbose run.
  • Skills bundled with the CLI (Blazor, or no package installed) are tracked without a pin, from the ref recorded in a new skills-source.json next to each bundled skills/ folder. A folder that gh skill updated is left as it is and listed.
  • Every skill the CLI writes carries a managed-by: igniteui-cli marker, which gh skill drops when it rewrites the folder. That is how a run with the bundled skills tells a folder gh skill updated from one the CLI wrote, including one written earlier from a package (for example after node_modules was removed).
  • For agent folders that gh skill does not scan (everything except .agents/skills, .claude/skills, .junie/skills), ig ai-config prints the --dir command.
  • ig new for React and Web Components copies the skills after the package install, so they come from the installed package.
  • The bundled skills are now taken from each framework repository's latest release instead of master, and were refreshed (Angular 22.3.1, React 19.11.0, Web Components 7.5.0, Blazor 1.0.1). This is most of the diff; the code is in packages/core/util/gh-skill-metadata.ts, packages/core/util/ai-skills.ts, packages/cli/lib/commands/ai-config.ts and packages/cli/lib/commands/new.ts.
  • A SKILL.md that starts with a byte order mark is written without it, because gh does not read a frontmatter after one.

Related Issue

None.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring / code cleanup
  • Build / CI configuration change

Affected Packages

  • igniteui-cli (packages/cli)
  • @igniteui/cli-core (packages/core)
  • @igniteui/angular-templates (packages/igx-templates)
  • @igniteui/angular-schematics (packages/ng-schematics)
  • @igniteui/mcp-server (packages/igniteui-mcp)

Checklist

  • I have tested my changes locally (npm run test)
  • I have built the project successfully (npm run build)
  • I have run the linter (npm run lint)
  • I have added/updated tests as needed
  • My changes do not introduce new warnings or errors

Additional Context

Tested on Windows 11, Node 24, gh 2.105.0, on the top of the stack. npm run jasmine was used instead of npm run test, so there is no coverage report: 1041 of 1043 specs executed, 2 pending (existing), no failures. The last two commits (managed-by marker on package skills, and the list of replaced folders, with their specs) were added after that run and were checked by CI only.

Checked against the real gh skill, with the written skills compared to the tags of the framework repositories:

  • every framework, from a package (latest, oldest with skills/, a middle version and a prerelease) and from the bundled copies;
  • all 8 agents, alone and together;
  • ig ai-config, ig new (with and without --skip-install, with a failing install), the step by step wizard for the four frameworks and ng g @igniteui/angular-schematics:ai-config, including the real prompts through a pseudo-terminal;
  • re-runs, local edits, gh skill update and gh skill update --unpin in between, gh skill install before ig ai-config, a package upgrade, and a switch from bundled to package skills;
  • frontmatter forms: no metadata, block and inline metadata, lists, CRLF, BOM, no frontmatter.

Known limits:

  • In the step by step wizard React and Web Components skills are written before the install, so they are the bundled ones; a later ig ai-config replaces them with the installed package's.
  • A skill renamed between two package versions leaves the old folder in place.
  • A package hoisted to a parent node_modules (workspaces) is not found, so the bundled skills are used.
  • Skill files are copied as text, so a binary file inside a skill folder is corrupted. No published Ignite UI skill has one.
  • ng add igniteui-angular writes metadata only after igniteui-angular depends on a released @igniteui/angular-schematics with this change.
  • Not tested: Linux and macOS, a licensed @infragistics/igniteui-angular install (simulated only), and an agent actually loading the skills.

🤖 Generated with Claude Code

@dkalinovInfra
dkalinovInfra added this pull request to stack #1915 December 1, 2026 07:24
@coveralls

coveralls commented Dec 1, 2026 •

Copy link
Copy Markdown

Coverage Status

Coverage is 95.709% — dkalinov/gh-skill-metadata into dkalinov/gh-skill-hide-bundled-copies. No base build found for dkalinov/gh-skill-hide-bundled-copies.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Package-to-bundled skill fallback can leave stale CLI-installed content because ownership metadata is missing, and malformed Markdown fences and a removed Sorting heading break the grid reference rendering and navigation.

2 open issues
What changed in this PR

This PR adds gh skill tracking to Ignite UI skills copied into projects by ig ai-config, building on the earlier template-storage change.

Changes:

  • Adds source metadata, package-version pins, ownership checks, and update guidance.
  • Defers skill copying until after package installation during project creation.
  • Refreshes bundled framework skills from releases and records their source revisions.
File Description
spec/​unit/​new-spec.ts Tests post-install skill copying and skip-install behavior.
spec/​unit/​ai-config-spec.ts Tests tracking messages and externally managed skills.
README.md Documents tracking, pinning, and update behavior.
packages/​igx-templates/​igx-ts/​projects/​ai-config/​files/​skills/​igniteui-angular-theming/​references/​mcp-setup.md Refreshes theming server setup guidance.
packages/​igx-templates/​igx-ts/​projects/​ai-config/​files/​skills/​igniteui-angular-theming/​references/​common-patterns.md Expands scoped-theme examples.
packages/​igx-templates/​igx-ts/​projects/​ai-config/​files/​skills/​igniteui-angular-grids/​references/​structure.md Updates column configuration and selection guidance.
packages/​igx-templates/​igx-ts/​projects/​ai-config/​files/​skills/​igniteui-angular-grids/​references/​state.md Updates state and pivot API examples.
packages/​igx-templates/​igx-ts/​projects/​ai-config/​files/​skills/​igniteui-angular-grids/​references/​sizing.md Adds server-rendering and sizing guidance.
packages/​igx-templates/​igx-ts/​projects/​ai-config/​files/​skills/​igniteui-angular-grids/​references/​paging-remote.md Corrects remote-sorting types and handlers.
packages/​igx-templates/​igx-ts/​projects/​ai-config/​files/​skills/​igniteui-angular-grids/​references/​features.md Refreshes grouping, merging, and drag examples.
packages/​igx-templates/​igx-ts/​projects/​ai-config/​files/​skills/​igniteui-angular-grids/​references/​editing.md Updates editing and validation APIs.
packages/​igx-templates/​igx-ts/​projects/​ai-config/​files/​skills/​igniteui-angular-generate-from-image-design/​SKILL.md.template Refreshes design-image workflow and prerequisites.
packages/​igx-templates/​igx-ts/​projects/​ai-config/​files/​skills/​igniteui-angular-generate-from-image-design/​references/​component-mapping.md Corrects Tile Manager component mapping.
packages/​igx-templates/​igx-ts/​projects/​ai-config/​files/​skills/​igniteui-angular-figma-to-app/​references/​project-setup.md Adds project detection and scaffolding guidance.
packages/​igx-templates/​igx-ts/​projects/​ai-config/​files/​skills/​igniteui-angular-components/​SKILL.md.template Refreshes component routing and documentation workflow.
packages/​igx-templates/​igx-ts/​projects/​ai-config/​files/​skills/​igniteui-angular-components/​references/​setup.md Corrects providers and component entry points.
packages/​igx-templates/​igx-ts/​projects/​ai-config/​files/​skills/​igniteui-angular-components/​references/​mcp-setup.md Updates documentation-server setup instructions.
packages/​igx-templates/​igx-ts/​projects/​ai-config/​files/​skills/​igniteui-angular-components/​references/​layout.md Refreshes layout component guidance.
packages/​igx-templates/​igx-ts/​projects/​ai-config/​files/​skills/​igniteui-angular-components/​references/​feedback.md Corrects snackbar and banner examples.
packages/​igx-templates/​igx-ts/​projects/​ai-config/​files/​skills-source.json Records Angular release and skill tree hashes.
packages/​core/​util/​index.ts Exports skill metadata utilities.
packages/​core/​util/​ai-skills.ts Adds metadata injection and ownership-aware copying.
packages/​cli/​templates/​webcomponents/​igc-ts/​projects/​ai-config/​files/​skills/​README.md Refreshes the Web Components skill catalog.
packages/​cli/​templates/​webcomponents/​igc-ts/​projects/​ai-config/​files/​skills/​igniteui-wc-integrate-with-framework/​SKILL.md.template Updates framework routing and Lit guidance.
packages/​cli/​templates/​webcomponents/​igc-ts/​projects/​ai-config/​files/​skills/​igniteui-wc-integrate-with-framework/​references/​vue.md Clarifies Vue integration instructions.
packages/​cli/​templates/​webcomponents/​igc-ts/​projects/​ai-config/​files/​skills/​igniteui-wc-integrate-with-framework/​references/​vanilla-js.md Adds Shadow DOM grid-theme guidance.
packages/​cli/​templates/​webcomponents/​igc-ts/​projects/​ai-config/​files/​skills/​igniteui-wc-integrate-with-framework/​references/​react.md Clarifies React wrapper setup.
packages/​cli/​templates/​webcomponents/​igc-ts/​projects/​ai-config/​files/​skills/​igniteui-wc-integrate-with-framework/​references/​angular.md Clarifies Angular value-accessor requirements.
packages/​cli/​templates/​webcomponents/​igc-ts/​projects/​ai-config/​files/​skills/​igniteui-wc-figma-to-app/​references/​project-setup.md Adds scaffolding and implementation-layout guidance.
packages/​cli/​templates/​webcomponents/​igc-ts/​projects/​ai-config/​files/​skills/​igniteui-wc-customize-component-theme/​references/​mcp-setup.md Adds theming server setup instructions.
packages/​cli/​templates/​webcomponents/​igc-ts/​projects/​ai-config/​files/​skills/​igniteui-wc-choose-components/​reference/​mcp-setup.md Clarifies documentation-server setup.
packages/​cli/​templates/​webcomponents/​igc-ts/​projects/​ai-config/​files/​skills-source.json Records Web Components release and tree hashes.
packages/​cli/​templates/​react/​igr-ts/​projects/​ai-config/​files/​skills/​README.md Refreshes the React skill catalog and layout.
packages/​cli/​templates/​react/​igr-ts/​projects/​ai-config/​files/​skills/​igniteui-react-generate-from-image-design/​references/​gotchas.md Adds consolidated design implementation pitfalls.
packages/​cli/​templates/​react/​igr-ts/​projects/​ai-config/​files/​skills/​igniteui-react-generate-from-image-design/​reference/​gotchas.md Removes the superseded reference file.
packages/​cli/​templates/​react/​igr-ts/​projects/​ai-config/​files/​skills/​igniteui-react-customize-theme/​references/​CSS-THEMING.md Adds revised CSS theming patterns.
packages/​cli/​templates/​react/​igr-ts/​projects/​ai-config/​files/​skills/​igniteui-react-customize-theme/​reference/​TROUBLESHOOTING.md Removes legacy theming troubleshooting.
packages/​cli/​templates/​react/​igr-ts/​projects/​ai-config/​files/​skills/​igniteui-react-customize-theme/​reference/​MCP-SERVER.md Removes legacy theming server instructions.
packages/​cli/​templates/​react/​igr-ts/​projects/​ai-config/​files/​skills/​igniteui-react-customize-theme/​reference/​CSS-THEMING.md Removes superseded CSS theming guidance.
packages/​cli/​templates/​react/​igr-ts/​projects/​ai-config/​files/​skills/​igniteui-react-components/​references/​USAGE.md Consolidates JSX, events, refs, and forms.
packages/​cli/​templates/​react/​igr-ts/​projects/​ai-config/​files/​skills/​igniteui-react-components/​references/​TROUBLESHOOTING.md Adds concise component troubleshooting.
packages/​cli/​templates/​react/​igr-ts/​projects/​ai-config/​files/​skills/​igniteui-react-components/​references/​MCP.md Adds tool arguments and server setup guidance.
packages/​cli/​templates/​react/​igr-ts/​projects/​ai-config/​files/​skills/​igniteui-react-components/​references/​DATAVIZ.md Adds chart registration and grid guidance.
packages/​cli/​templates/​react/​igr-ts/​projects/​ai-config/​files/​skills/​igniteui-react-components/​references/​COMPONENTS.md Adds component selection and tab patterns.
packages/​cli/​templates/​react/​igr-ts/​projects/​ai-config/​files/​skills/​igniteui-react-components/​reference/​TROUBLESHOOTING.md Removes superseded troubleshooting content.
packages/​cli/​templates/​react/​igr-ts/​projects/​ai-config/​files/​skills/​igniteui-react-components/​reference/​REFS-FORMS.md Removes legacy refs and forms guidance.
packages/​cli/​templates/​react/​igr-ts/​projects/​ai-config/​files/​skills/​igniteui-react-components/​reference/​MCP-SERVER.md Removes superseded server setup guidance.
packages/​cli/​templates/​react/​igr-ts/​projects/​ai-config/​files/​skills/​igniteui-react-components/​reference/​JSX-PATTERNS.md Removes legacy JSX examples.
packages/​cli/​templates/​react/​igr-ts/​projects/​ai-config/​files/​skills/​igniteui-react-components/​reference/​INSTALLATION.md Removes legacy installation guidance.
packages/​cli/​templates/​react/​igr-ts/​projects/​ai-config/​files/​skills/​igniteui-react-components/​reference/​EVENT-HANDLING.md Removes superseded event guidance.
packages/​cli/​templates/​react/​igr-ts/​projects/​ai-config/​files/​skills-source.json Records React release and skill tree hashes.
packages/​cli/​templates/​blazor/​igb/​projects/​ai-config/​files/​skills/​README.md Refreshes Blazor skill and setup documentation.
packages/​cli/​templates/​blazor/​igb/​projects/​ai-config/​files/​skills/​igniteui-blazor-theming/​references/​mcp-setup.md Removes separate theming server setup reference.
packages/​cli/​templates/​blazor/​igb/​projects/​ai-config/​files/​skills/​igniteui-blazor-grids/​references/​state.md Revises grid state persistence examples.
packages/​cli/​templates/​blazor/​igb/​projects/​ai-config/​files/​skills/​igniteui-blazor-grids/​references/​mcp-setup.md Removes separate grid server setup reference.
packages/​cli/​templates/​blazor/​igb/​projects/​ai-config/​files/​skills/​igniteui-blazor-grids/​references/​grid-migration.md Adds Grid Lite migration guidance.
packages/​cli/​templates/​blazor/​igb/​projects/​ai-config/​files/​skills/​igniteui-blazor-components/​references/​mcp-setup.md Removes separate component server setup reference.
packages/​cli/​templates/​blazor/​igb/​projects/​ai-config/​files/​skills/​igniteui-blazor-components/​references/​client-scripts.md Adds client-script registration and template guidance.
packages/​cli/​templates/​blazor/​igb/​projects/​ai-config/​files/​skills/​AGENTS.md Refreshes Blazor package and API instructions.
packages/​cli/​templates/​blazor/​igb/​projects/​ai-config/​files/​skills-source.json Records Blazor release and skill tree hashes.
packages/​cli/​lib/​commands/​new.ts Copies skills after package installation.
packages/​cli/​lib/​commands/​ai-config.ts Reports tracking, preserved folders, and directory hints.
CHANGELOG.md Records tracking support and bundled refreshes.
.github/​workflows/​npm-publish.yml Supplies a token for release lookups during builds.
.agents/​skills/​igniteui-cli-ai-config-skills-refresh/​scripts/​sync-skills.mjs Defaults to releases and writes source records.

Review effort: Balanced

Comment thread packages/core/util/ai-skills.ts Resolved
dkalinovInfra and others added 6 commits December 2, 2026 16:22
Each SKILL.md written by ig ai-config now carries the github-* metadata
that gh skill list and gh skill update track a skill by.

- Skills from an installed Ignite UI package are pinned to the installed
  version and always overwritten. Their tree SHA is computed from the
  files in node_modules.
- Skills bundled with the CLI take repo, ref and tree SHAs from a
  skills-source.json record next to the skills folder, are not pinned,
  and carry a managed-by marker. A bundled skill folder that gh updated
  (metadata without the marker) is left as it is and listed.
- ig new for React and Web Components copies skills after the package
  install, so they come from the installed package.
- update-skills.ts and the refresh script take the skills from each
  framework repository's latest release, which is what gh skill update
  compares with, and write the source record.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Mirrors skills/ from igniteui-angular 22.3.1, igniteui-react 19.11.0,
igniteui-webcomponents 7.5.0 and igniteui-blazor 1.0.1, and adds the
skills-source.json record for each.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…folders are unchanged

React, Web Components and Blazor bundle a README.md (and AGENTS.md) directly under skills/.
Those files are never gh-managed, so the "managed by gh skill. Nothing to write." summary
could not be reached for them.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…skill metadata

gh skill does not read a frontmatter that follows a byte order mark, so such a skill
was written with metadata but listed without a source.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Skills copied from an installed package had gh skill metadata but no
managed-by marker, so a later run that fell back to the bundled skills
(node_modules removed, package hoisted) took them for folders that
gh skill manages and left the old pinned content in place.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
ig ai-config always writes the installed package's skills, also over a
folder that gh skill installed or updated (e.g. gh skill update --unpin).
That was reported only as "Updated <path>", and not at all in a
non-verbose run, so nothing said that the unpin was undone. Such folders
are now listed after the copy.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@kdinev
kdinev force-pushed the dkalinov/gh-skill-metadata branch from d0018b5 to 81ef6b3 Compare December 2, 2026 14:22
@kdinev
kdinev merged commit f24ce77 into master Dec 3, 2026
4 checks passed
@kdinev
kdinev deleted the dkalinov/gh-skill-metadata branch December 3, 2026 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants